//
//  @ Project : Galaxy Star Trading System
//  @ File Name : FemasConvert.h
//  @ Date : 2014/9/5
//  @ Author :
//
//


#if !defined(_FemasConvert_H_H)
#define _FemasConvert_H_H


#include "api/USTPFtdcTraderApi.h"
#include "api/USTPFtdcMduserApi.h"
#include "api/USTPFtdcUserApiDataType.h"
#include "api/USTPFtdcUserApiStruct.h"

namespace GSTrader
{
	namespace TradeService
	{
		class CFemasConvert
		{
		public:
			CFemasConvert();
			virtual ~CFemasConvert();

			void ConvertInputOrder(CUstpFtdcInputOrderField* pOrder, COrder* pTheData);
			void ConvertOrder(CUstpFtdcOrderField* pOrder, COrder* pTheData);
			void ConvertTrade(CUstpFtdcTradeField* pTrade, CTrade* pTheData);
			void ConvertTradingAccount(CUstpFtdcRspInvestorAccountField* pTradingAccount, CTradingAccount* pTheData);
			void ConvertMarketData(CUstpFtdcDepthMarketDataField* pDepthMarketData, CDepthMarketData* pMarketData);

			void ConvertPosition(CUstpFtdcRspInvestorPositionField* pInvestorPosition, CPosition* pTheData);
			void ConvertInstrument(CUstpFtdcRspInstrumentField* pInstrument, CInstrument* pThedata);
			void ConvertExchangeStatus(CUstpFtdcInstrumentStatusField* pStatus, CExchangeStatus* pTheData);

			void ConvertMarginRate(CUstpFtdcInvestorMarginField* pInstrumentMarginRate, CMarginRate* pTheData);
			void ConvertCommissionRate(CUstpFtdcInvestorFeeField* pInstrumentCommissionRate, CCommissionRate* pTheData);
		};

	}
}

#endif // _FemasConvert_H_H